from odoo import api, fields, models


class Hotel_commodity(models.Model):
    _name = 'hotel.commodity'
    _description = '商品'
    # _rec_name = 'name'

    commodity_number = fields.Char(
        '商品编号',
        required=True
    )
    commodity_name = fields.Char(
        '商品名称',
        required=True
    )
    commodity_type = fields.Many2one(
        'commodity.type',
        string='商品类型',
        required=True,
        ondelete='set null'
    )
    commodity_price = fields.Char(
        '预设价格',
        required=True
    )
